﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class ButtonEvent : MonoBehaviour {

	// Use this for initialization
	void Start () {
		
	}
	
	// Update is called once per frame
	void Update () {
		
	}

    public void onClick(int iType)
    {
        /*
        iType:
        1X 登录界面   
           10 登录 11 退出
         * 2X 操作玩家移动
         */
        if (iType == 10)
        {
            EventDispatcher.CleanListener();
            UnityEngine.SceneManagement.SceneManager.LoadScene("Game");
        }
        else if (iType == 11)
            Application.Quit();
        else if (iType == 20 || iType == 21 || iType == 22 || iType == 23 || iType == 24 || iType == 25 || iType == 26 || iType == 27)
        {
            //20 - 27 左上 正上 右上 左 右 左下 正下 右下
            //测试用按钮
            /*
            Hashtable adata = new Hashtable();
            adata["msg"] = iType;
            NotificationCenter.DefaultCenter().PostNotification(this, "PlayerScript_movePlayer", adata);
             */
        }
    }

        
}
